package com.study;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
@MapperScan(basePackages = {"com.study.dao","com.study.mp.service"})
/**
 * 如果采用外部容器启动需要extends SpringBootServletInitializer并且容器版本要和springboot版本兼容--本例是tomcat8
 * @override configure(SpringApplicationBuilder builder)
 * 采用jar报方式启动(main方法-->springIoc容器+内嵌容器启动)
 * 采用外部容器启动(先启动容器-->springIoc容器这时候在Ioc容器中不会再次启动内置容器ConditionOnMissBean注解)
 * 单纯extends SpringBootServletInitializer并且@Override但是仍然执行main方法启动
 * 与不extends SpringBootServletInitializer效果一致
 */
//public class GraphqlApplication extends SpringBootServletInitializer {

public class GraphqlApplication {

  public static void main(String[] args) {
    SpringApplication.run(GraphqlApplication.class, args);
  }

//  @Override
//  protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
//    return super.configure(builder);
//  }
}
